Skip to content

Check dashboard authentication in frontend#21

Merged
zhenghaoz merged 3 commits into
gorse-io:masterfrom
zhangzhenghao:frontend-auth-guard
Jun 12, 2026
Merged

Check dashboard authentication in frontend#21
zhenghaoz merged 3 commits into
gorse-io:masterfrom
zhangzhenghao:frontend-auth-guard

Conversation

@zhangzhenghao

Copy link
Copy Markdown
Contributor

Summary

  • Add client-side auth status tracking and route guards for protected dashboard pages
  • Redirect unauthenticated users to the login page and preserve the intended destination
  • Handle login/logout with axios so auth status is updated without relying on full-page form navigation

Test Plan

  • pnpm exec eslint src/components/layout/MainNavbar/MainNavbar.vue src/layouts/Login.vue src/main.js src/router.js src/utils/auth.js
  • pnpm build

Note: pnpm lint still fails on existing repository-wide lint issues outside this change.

@zhenghaoz zhenghaoz changed the title fix: guard dashboard authentication routes Check dashboard authentication in frontend Jun 9, 2026
@zhenghaoz zhenghaoz merged commit 0a72cc0 into gorse-io:master Jun 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants